{include file='public/head' /}
{include file='public/left' /}
<script type="text/javascript" charset="utf-8" src="/static/edit/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/edit/ueditor.all.min.js"> </script>
    <div class="main" style="padding:10px;">
        <div class="content">
            <span>商品列表</span>
            <div></div>
        </div>
            <form class="layui-form" action="/admin/Index/add" method="POST" enctype="multipart/form-data">
                <div class="layui-form-item">
                    <label class="layui-form-label">标题</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" name="title">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">分类</label>
                    <div class="layui-input-inline">
                        <select name="cat">
                            <option value="0"></option>
                            {volist name='cat' id='cat_v'}
                                <option value="{$cat_v['id']}">{$cat_v['name']}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">原价</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" name="price">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">折扣</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" name="discount">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">库存</label>
                    <div class="layui-input-inline">
                        <input class="layui-input" type="text" name="stock">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">图片</label>
                    <div class="layui-input-inline">
                        <input  type="file" name="image" > <!-- class="layui-input" -->
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">文字</label>
                    <div class="layui-input-inline">
                        <script id="desc" name="desc" type="text/plain" style="width:1024px;height:500px;"></script>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-inline">
                        <select name="status">
                            <option value="1">开启</option>
                            <option value="0">关闭</option>
                        </select>
                    </div>
                </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" type="submit">添加</button>
                </div>
            </div>
        </form>
        </div>
<script>
    		layui.use(['layer','form'],function(){
			form = layui.form;
			layer = layui.layer;
			$ = layui.jquery;
        }); 
        
        var ue = UE.getEditor('desc', {
            toolbars: [["fullscreen","source","undo"
                ,"redo","bold","italic","underline"
                ,"fontborder","strikethrough","superscript"
                ,"subscript","insertunorderedlist"
                ,"insertorderedlist","justifyleft"
                ,"justifycenter","justifyright","justifyjustify"
                ,"removeformat","simpleupload","snapscreen","emotion","attachment"
                ]],
                autoHeightEnabled: true,
                autoFloatEnabled: true
        });
        ue.ready(function() {
          ue.setHeight(200);
        });
</script>
{include file='public/bottom' /}